.class public Lcom/xingbook/ui/overclass/f;
.super Landroid/widget/ImageView;


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "ViewConstructor"
    }
.end annotation


# instance fields
.field public a:Lcom/xingbook/ui/overclass/d;

.field public b:Landroid/graphics/RectF;

.field c:I

.field d:I

.field e:Landroid/view/WindowManager$LayoutParams;

.field f:Landroid/view/WindowManager;

.field g:Landroid/graphics/Bitmap;

.field h:Landroid/widget/ImageView;

.field private i:Lcom/xingbook/ui/overclass/e;

.field private j:I


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/graphics/Bitmap;II)V
    .locals 0

    invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput p3, p0, Lcom/xingbook/ui/overclass/f;->c:I

    iput p4, p0, Lcom/xingbook/ui/overclass/f;->d:I

    iput-object p2, p0, Lcom/xingbook/ui/overclass/f;->g:Landroid/graphics/Bitmap;

    return-void
.end method


# virtual methods
.method public a()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->f:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    invoke-interface {v0, v1}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    :cond_0
    return-void
.end method

.method public a(II)V
    .locals 3

    const/4 v2, -0x2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    if-nez v0, :cond_0

    new-instance v0, Landroid/view/WindowManager$LayoutParams;

    invoke-direct {v0}, Landroid/view/WindowManager$LayoutParams;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    const/16 v1, 0x33

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->gravity:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/overclass/f;->c:I

    div-int/lit8 v1, v1, 0x2

    sub-int v1, p1, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/overclass/f;->d:I

    div-int/lit8 v1, v1, 0x2

    sub-int v1, p2, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iput v2, v0, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iput v2, v0, Landroid/view/WindowManager$LayoutParams;->height:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    const/16 v1, 0x198

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    const/4 v1, -0x3

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->format:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    const/4 v1, 0x0

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->windowAnimations:I

    invoke-virtual {p0}, Lcom/xingbook/ui/overclass/f;->getContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "window"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    iput-object v0, p0, Lcom/xingbook/ui/overclass/f;->f:Landroid/view/WindowManager;

    new-instance v0, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/xingbook/ui/overclass/f;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->g:Landroid/graphics/Bitmap;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->f:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    :cond_0
    return-void
.end method

.method public b(II)V
    .locals 3

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/overclass/f;->c:I

    div-int/lit8 v1, v1, 0x2

    sub-int v1, p1, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/xingbook/ui/overclass/f;->d:I

    div-int/lit8 v1, v1, 0x2

    sub-int v1, p2, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->f:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    :cond_0
    return-void
.end method

.method public c(II)V
    .locals 3

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iput p1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iput p2, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->f:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void
.end method

.method public getImageCenterX()I
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget v0, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getWidth()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    add-int/2addr v0, v1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getImageCenterY()I
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->e:Landroid/view/WindowManager$LayoutParams;

    iget v0, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    iget-object v1, p0, Lcom/xingbook/ui/overclass/f;->h:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->getHeight()I

    move-result v1

    div-int/lit8 v1, v1, 0x2

    add-int/2addr v0, v1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getPasterAudioIndex()I
    .locals 1

    iget v0, p0, Lcom/xingbook/ui/overclass/f;->j:I

    return v0
.end method

.method public getSrcBitmap()Landroid/graphics/Bitmap;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->g:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 4

    const/4 v2, 0x0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->i:Lcom/xingbook/ui/overclass/e;

    if-eqz v0, :cond_1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->i:Lcom/xingbook/ui/overclass/e;

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v1

    invoke-virtual {p0}, Lcom/xingbook/ui/overclass/f;->getLeft()I

    move-result v2

    int-to-float v2, v2

    sub-float/2addr v1, v2

    float-to-int v1, v1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v2

    invoke-virtual {p0}, Lcom/xingbook/ui/overclass/f;->getTop()I

    move-result v3

    int-to-float v3, v3

    sub-float/2addr v2, v3

    float-to-int v2, v2

    invoke-interface {v0, p0, v1, v2}, Lcom/xingbook/ui/overclass/e;->a(Ljava/lang/Object;II)V

    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/widget/ImageView;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    return v0

    :cond_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/overclass/f;->i:Lcom/xingbook/ui/overclass/e;

    const/4 v1, 0x0

    invoke-interface {v0, v1, v2, v2}, Lcom/xingbook/ui/overclass/e;->a(Ljava/lang/Object;II)V

    goto :goto_0
.end method

.method public setImageInitLocation(Lcom/xingbook/ui/overclass/d;)V
    .locals 6

    iput-object p1, p0, Lcom/xingbook/ui/overclass/f;->a:Lcom/xingbook/ui/overclass/d;

    new-instance v0, Landroid/graphics/RectF;

    iget v1, p1, Lcom/xingbook/ui/overclass/d;->a:I

    iget v2, p0, Lcom/xingbook/ui/overclass/f;->c:I

    div-int/lit8 v2, v2, 0x4

    add-int/2addr v1, v2

    int-to-float v1, v1

    iget v2, p1, Lcom/xingbook/ui/overclass/d;->b:I

    iget v3, p0, Lcom/xingbook/ui/overclass/f;->d:I

    div-int/lit8 v3, v3, 0x4

    add-int/2addr v2, v3

    int-to-float v2, v2

    iget v3, p1, Lcom/xingbook/ui/overclass/d;->a:I

    iget v4, p0, Lcom/xingbook/ui/overclass/f;->c:I

    mul-int/lit8 v4, v4, 0x3

    div-int/lit8 v4, v4, 0x4

    add-int/2addr v3, v4

    int-to-float v3, v3

    iget v4, p1, Lcom/xingbook/ui/overclass/d;->b:I

    iget v5, p0, Lcom/xingbook/ui/overclass/f;->d:I

    mul-int/lit8 v5, v5, 0x3

    div-int/lit8 v5, v5, 0x4

    add-int/2addr v4, v5

    int-to-float v4, v4

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/RectF;-><init>(FFFF)V

    iput-object v0, p0, Lcom/xingbook/ui/overclass/f;->b:Landroid/graphics/RectF;

    return-void
.end method

.method public setPasterAudioIndex(I)V
    .locals 0

    iput p1, p0, Lcom/xingbook/ui/overclass/f;->j:I

    return-void
.end method

.method public setTouchedListener(Lcom/xingbook/ui/overclass/e;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/ui/overclass/f;->i:Lcom/xingbook/ui/overclass/e;

    return-void
.end method
